'use strict';
angular.module('app').config([
    '$stateProvider', '$urlRouterProvider', '$locationProvider', 'RouteHelpersProvider',
    function ($stateProvider, $urlRouterProvider, $locationProvider, helper) {
        // $locationProvider.hashPrefix('main');
        $urlRouterProvider.otherwise('/app/exchangeList');
        $stateProvider
            .state('app', {
                abstract: true,
                url: '/app',
                templateUrl: helper.basepath('common/layout.html')
            })
            .state('app.voteList', {
                url: '/voteList',
                templateUrl: helper.basepath('modules/vote/vote.list.html'),
                resolve: helper.resolveFor('voteList'),
                controller: 'voteListCtrl'
            })
            .state('app.prizeList', {
                url: '/prizeList',
                templateUrl: helper.basepath('modules/prize/prize.list.html'),
                resolve: helper.resolveFor('prizeList'),
                controller: 'prizeListCtrl'
            })
            .state('app.exchangeList', {
                url: '/exchangeList',
                templateUrl: helper.basepath('modules/exchange/exchange.list.html'),
                resolve: helper.resolveFor('exchangeList'),
                controller: 'exchangeListCtrl'
            })
            .state('app.exportList', {
                url: '/exportList',
                templateUrl: helper.basepath('modules/export/export.list.html'),
                resolve: helper.resolveFor('exportList'),
                controller: 'exportListCtrl'
            })
    }]);